Title: Border Crossing
Author: Imzogelmo, Lenophis, Novalia Spirit
Version: v1.0a
Applies to: FF6us v1.0, FF6us v1.1, FF6j, FF6A (JUE)
Tested on: FF6us v1.0, FF6A (JUE)

Contents: Border Crossing US - header.ips
          Border Crossing US - no header.ips
          Border Crossing Japan - header.ips
          Border Crossing Japan - no header.ips
          Border Crossing GBA.ips
          Anti Border Crossing US - header.ips
          Anti Border Crossing US - no header.ips
          Anti Border Crossing Japan - header.ips
          Anti Border Crossing Japan - no header.ips
          Anti Border Crossing GBA.ips
          readme.txt - this thing you are reading.

ROM addresses: C0/C1B2 - C0/C1B4 - US versions
               C0/C1B9 - C0/C1BB - US versions
               C0/C0E4 - C0/C0E7 - Japanese version
               C0/C0EB - C0/C0ED - Japanese version
               08001C10 & 08001C11 - GBA versions
               08001C14 & 08001C15 - GBA versions

Urgency: A mystery value.

--------------------------------------------------------------------------------

Description:

On an overworld map, battles are determined by choosing a formation from a group
within 32x32 tile zone. The game calculates the zone based on the coordinates
of the party.

However, the zone calculation is not run on each step, but rather on each redraw
of the map.

Examples of redraws include exiting battle, exiting the menu, and exiting a
town.

It is easy to see this bug by entering and exiting the menu at a boundary where
the enemy formations change, then walking into the adjacent zone until a battle
is triggered. Monsters will appear from the previous zone.

--------------------------------------------------------------------------------

What this patch does:

Corrects the behavior by loading from variables that are updated every step.

The anti patches effectively remove this patch.

--------------------------------------------------------------------------------

v1.0a - February 3, 2010
        Added patches for GBA versions, patch otherwise unchanged.

v1.0 - January 19, 2010
       Initial patch

--------------------------------------------------------------------------------

Credits:

Mnrogar: For originally discovering this bug.
